package cn.brilliantfuture.commentry.entity;

// Generated 2012-8-23 15:39:48 by Hibernate Tools 3.3.0.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.validator.NotNull;

/**
 * StorageChargeInfo generated by hbm2java
 */
@Entity
@Table(name = "storage_charge_info", catalog = "cabinet")
public class StorageChargeInfo implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer storageChargeInfoId;
	private int freePeriod;
	private int chargeInterval;
	private double chargeStandard;
	private double growthRate;
	private Date insertTime;
	private int insertUser;
	private boolean deleted = false;
	private Set<StorageServiceInfo> storageServiceInfos = new HashSet<StorageServiceInfo>(
			0);

	public StorageChargeInfo() {
	}

	public StorageChargeInfo(int freePeriod, int chargeInterval,
			double chargeStandard, double growthRate, Date insertTime,
			int insertUser, boolean deleted) {
		this.freePeriod = freePeriod;
		this.chargeInterval = chargeInterval;
		this.chargeStandard = chargeStandard;
		this.growthRate = growthRate;
		this.insertTime = insertTime;
		this.insertUser = insertUser;
		this.deleted = deleted;
	}

	public StorageChargeInfo(int freePeriod, int chargeInterval,
			double chargeStandard, double growthRate, Date insertTime,
			int insertUser, boolean deleted,
			Set<StorageServiceInfo> storageServiceInfos) {
		this.freePeriod = freePeriod;
		this.chargeInterval = chargeInterval;
		this.chargeStandard = chargeStandard;
		this.growthRate = growthRate;
		this.insertTime = insertTime;
		this.insertUser = insertUser;
		this.deleted = deleted;
		this.storageServiceInfos = storageServiceInfos;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "storage_charge_info_id", unique = true, nullable = false)
	public Integer getStorageChargeInfoId() {
		return this.storageChargeInfoId;
	}

	public void setStorageChargeInfoId(Integer storageChargeInfoId) {
		this.storageChargeInfoId = storageChargeInfoId;
	}

	@Column(name = "free_period", nullable = false)
	public int getFreePeriod() {
		return this.freePeriod;
	}

	public void setFreePeriod(int freePeriod) {
		this.freePeriod = freePeriod;
	}

	@Column(name = "charge_interval", nullable = false)
	public int getChargeInterval() {
		return this.chargeInterval;
	}

	public void setChargeInterval(int chargeInterval) {
		this.chargeInterval = chargeInterval;
	}

	@Column(name = "charge_standard", nullable = false, precision = 22, scale = 2)
	public double getChargeStandard() {
		return this.chargeStandard;
	}

	public void setChargeStandard(double chargeStandard) {
		this.chargeStandard = chargeStandard;
	}

	@Column(name = "growth_rate", nullable = false, precision = 22, scale = 2)
	public double getGrowthRate() {
		return this.growthRate;
	}

	public void setGrowthRate(double growthRate) {
		this.growthRate = growthRate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "insert_time", nullable = false, length = 19)
	@NotNull
	public Date getInsertTime() {
		return this.insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	@Column(name = "insert_user", nullable = false)
	public int getInsertUser() {
		return this.insertUser;
	}

	public void setInsertUser(int insertUser) {
		this.insertUser = insertUser;
	}

	@Column(name = "deleted", nullable = false)
	public boolean isDeleted() {
		return this.deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "storageChargeInfo")
	public Set<StorageServiceInfo> getStorageServiceInfos() {
		return this.storageServiceInfos;
	}

	public void setStorageServiceInfos(
			Set<StorageServiceInfo> storageServiceInfos) {
		this.storageServiceInfos = storageServiceInfos;
	}

}
